package com.qixiao.lib.generic.defgeneric;

/**
 * 泛型类声明
 *
 * 类型形参命名规范
 * E - Element(Java 集合框架广泛使用)
 * K - Key
 * N - Number
 * T - Type
 * V - Value
 * S,U,V etc. - 2nd, 3rd, 4th types
 */
public class NormalGeneric<T> {
    private T data;

    public NormalGeneric() {
    }

    public NormalGeneric(T data) {
        this.data = data;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public static void main(String[] args) {
        NormalGeneric<String> normalGeneric = new NormalGeneric<String>();
        normalGeneric.setData("test");
        System.out.println(normalGeneric.getData());
    }
}
